﻿using System;
using System.Collections.Generic;
using System.Data;
using eSYSU.Web.Entity;


namespace eSYSU.Web.Interface
{
	/// <summary>
	/// 新闻接口
	/// </summary>
	public interface IArticle
	{
		int Id
		{
			get;
			set;
		}

		String Title
		{
			get;
			set;
		}

		String Author
		{
			get;
			set;
		}

		/// <summary>
		/// 获取指定数量的最新新闻
		/// </summary>
		/// <param name="newsCount">newsCount</param>
		/// <returns>IList</returns>
		IList<Article> GetLatestNews(int newsCount);


		/// <summary>
		/// 获取指定数量的最新新闻
		/// </summary>
		/// <param name="newsCount">newsCount</param>
		/// <returns>DataTable</returns>
		DataTable GetLatestNewsTable(int newsCount);
	}


	/// <summary>
	/// 用户接口
	/// </summary>
	public interface IUser
	{
		///// <summary>
		///// 得到全部用户信息
		///// </summary>
		///// <returns>用户集合</returns>
		//IList<User> GetAllUser();

		///// <summary>
		///// 得到全部用户信息
		///// </summary>
		///// <returns>DataTable</returns>
		//DataTable GetAllUserDS();

		///// <summary>
		///// 根据ID得到用户信息
		///// </summary>
		///// <param name="id">ID</param>
		///// <returns>用户</returns>
		//User GetUserById(int id);

		///// <summary>
		///// 插入用户信息
		///// </summary>
		///// <param name="user">用户</param>
		///// <returns>object</returns>
		//object InsertUser(User user);

		///// <summary>
		///// 修改用户信息
		///// </summary>
		///// <param name="user">用户</param>
		///// <returns>int</returns>
		//int ModifyUser(User user);

		///// <summary>
		///// 根据ID删除用户
		///// </summary>
		///// <param name="id">ID</param>
		///// <returns>int</returns>
		//int DeleteUser(int id);

		///// <summary>
		///// 根据用户编号得到用户信息
		///// </summary>
		///// <param name="userNo">教工号</param>
		///// <returns>bool</returns>
		//bool GetUserByUserNo(string userNo);

		///// <summary>
		///// 根据用户编号得到用户信息
		///// </summary>
		///// <param name="teacherNo">教工号</param>
		///// <returns>用户</returns>
		//User GetUserByNo(string userNo);

		///// <summary>
		///// 根据ID修改用户简介
		///// </summary>
		///// <param name="intro">用户简介</param>
		///// <param name="id">ID</param>
		///// <returns>int</returns>
		//int ModifyIntroById(string intro, int id);

		///// <summary>
		///// 根据条件模糊查询用户信息(带分页)
		///// </summary>
		///// <param name="userNo">教工号</param>
		///// <param name="userName">用户姓名</param>
		///// <param name="startIndex">开始索引</param>
		///// <param name="endIndex">结束索引</param>
		///// <returns>DataTable</returns>
		//DataTable GetUserByCondition(string userNo, string userName, int startIndex, int endIndex);

		///// <summary>
		///// 分页查询用户信息
		///// </summary>
		///// <param name="startIndex">开始索引</param>
		///// <param name="endIndex">结束索引</param>
		///// <returns>DataTable</returns>
		//DataTable SearchUserWithPage(int startIndex, int endIndex);

		///// <summary>
		///// 根据用户编号模糊查询用户信息
		///// </summary>
		///// <param name="no">用户编号</param>
		///// <returns>DataTable</returns>
		//DataTable GetUserByNoDS(string no);
	}
}